<template>
<div class="productList" >
    <div class="shop-box" v-for="item in productList" :key="item.id"  @click="jump(item.id)">
    <!-- <router-link :to="`detail/${item.id}`" > -->
      <div class="shop-left">
        <img :src="item.image" />
      </div>
      <div class="shop-right">
        <div class="shop-title">
          {{ item.store_name }}
        </div>
        <div class="shop-price" style="color: red">￥{{ item.price }}</div>
        <div class="shop-vip">
          <div class="shop-vip-price">￥{{ item.vip_price }}</div>
          <div class="shop-vip-icon">
            <img
              src=""
            />
          </div>
          <div class="shop-total">已售{{ item.sales }}</div>
        </div>
        <div class="shop-cart">
          <van-icon name="shopping-cart-o" size="20" color="red" />
        </div>
      </div>
    <!-- </router-link> -->
    </div>
    </div>
</template>

<script>
export default {
    props:{
        productList:Array,
    },
    methods:{
        jump(e){
            this.$router.push(`detail/${e}`)
        }
    }
    
}
</script>

<style lang="less" scoped>

.shop-box {
  display: flex;
  padding: 10px 10px;
  border-bottom: 1px solid #e8e8e8;
  .shop-left {
    width: 90px;
    height: 90px;
    img {
      width: 100%;
      height: 100%;
      display: block;
      border-radius: 6px;
    }
  }
  .shop-right {
    position: relative;
    width: 70%;
    margin-left: 20px;
    .shop-cuxiao{
      font-size: 11px;
      padding: 5px 0px;
      width: 50%;
      margin-top: 8%;
      text-align: center;
      background-color: rgb(255,82,54);
      color: white;
      border-radius: 14px 0px 14px 0px;
    }
    .shop-daily{
      margin-top: 8%;

      display: flex;
      .shop-daily-price{
        color: #999;
        font-size: 10px;
      }
      .shop-daily-total{
        color: #999;
        font-size: 10px;
        margin-left: auto;
      }
      
    }
    .shop-title {
      // color: #888;
      text-align: left;
      width: 100%;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
    }
    .shop-price {
      margin-top: 20px;
      color: #fc4141;
      font-size: 15px;
    }
    .shop-vip {
      display: flex;
      align-items: center;
      margin-top: 10px;
      .shop-vip-price {
        color: #282828;
        font-size: 10px;
        font-weight: 700;
      }
      .shop-total {
        color: #999;
        font-size: 10px;
        margin-left: 10px;
      }
      .shop-vip-icon {
        width: 23px;
        height: 10.5px;
        margin-left: 5px;

        img {
          width: 100%;
          height: 100%;
          display: block;
        }
      }
    }

    .shop-cart {
      position: absolute;
      right: 0;
      bottom: 0;
    }
  }
}
</style>